﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

namespace Directory.Web
{
    /// <summary>
    /// SimpleUserInfo 的摘要说明
    /// </summary>
    public sealed class SiteUser
    {
        private SiteUser() { }

        public SiteUser(string username, string nickname, DateTime lastLoginDate)
        {
			_userName = GetStringParameter(username);
			_nickName = GetStringParameter(nickname);
			_lastLoginDate=lastLoginDate;
        }

        private string _userName;
        private string _nickName;
		private DateTime _lastLoginDate;

        public string UserName
        {
            get { return _userName; }
        }
        public string NickName
        {
            get { return _nickName; }
        }
		public DateTime LastLoginDate
		{
			get { return _lastLoginDate; }
			set { _lastLoginDate = value; }
		}

		private string GetStringParameter(string parameter)
		{
			if (parameter == null)
			{
				return null;
			}
			else
			{
				return parameter.Trim();
			}
		}
    }
}
